package com.ruoyi.mobile.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mobile.mapper.UserOperateLogMapper;
import com.ruoyi.mobile.domain.UserOperateLog;
import com.ruoyi.mobile.service.IUserOperateLogService;

/**
 * 用户操作日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-01
 */
@Service
public class UserOperateLogServiceImpl implements IUserOperateLogService 
{
    @Autowired
    private UserOperateLogMapper userOperateLogMapper;

    /**
     * 查询用户操作日志
     * 
     * @param id 用户操作日志主键
     * @return 用户操作日志
     */
    @Override
    public UserOperateLog selectUserOperateLogById(Long id)
    {
        return userOperateLogMapper.selectUserOperateLogById(id);
    }

    /**
     * 查询用户操作日志列表
     * 
     * @param userOperateLog 用户操作日志
     * @return 用户操作日志
     */
    @Override
    public List<UserOperateLog> selectUserOperateLogList(UserOperateLog userOperateLog)
    {
        return userOperateLogMapper.selectUserOperateLogList(userOperateLog);
    }

    /**
     * 新增用户操作日志
     * 
     * @param userOperateLog 用户操作日志
     * @return 结果
     */
    @Override
    public int insertUserOperateLog(UserOperateLog userOperateLog)
    {
        userOperateLog.setCreateTime(DateUtils.getNowDate());
        return userOperateLogMapper.insertUserOperateLog(userOperateLog);
    }

    /**
     * 修改用户操作日志
     * 
     * @param userOperateLog 用户操作日志
     * @return 结果
     */
    @Override
    public int updateUserOperateLog(UserOperateLog userOperateLog)
    {
        return userOperateLogMapper.updateUserOperateLog(userOperateLog);
    }

    /**
     * 批量删除用户操作日志
     * 
     * @param ids 需要删除的用户操作日志主键
     * @return 结果
     */
    @Override
    public int deleteUserOperateLogByIds(Long[] ids)
    {
        return userOperateLogMapper.deleteUserOperateLogByIds(ids);
    }

    /**
     * 删除用户操作日志信息
     * 
     * @param id 用户操作日志主键
     * @return 结果
     */
    @Override
    public int deleteUserOperateLogById(Long id)
    {
        return userOperateLogMapper.deleteUserOperateLogById(id);
    }
}
